package com.hshoesmall.demo.controller;

import com.hshoesmall.demo.common.api.ApiResult;
import com.hshoesmall.demo.mapper.CartListMapper;
import com.hshoesmall.demo.model.entity.CartList;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/cartList")
public class CartListController {

    @Resource
    CartListMapper cartListMapper;

    @GetMapping
    public ApiResult<List<CartList>> getCartList(){
        List<CartList> cartLists=cartListMapper.GoCartList();
        return ApiResult.success(cartLists);
    }
}
